package com.tfswx.ruleengine.compute.bean;

import com.tfswx.ruleengine.compute.enums.BdslxEnum;
import com.tfswx.ruleengine.compute.enums.GllxEnum;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author Ricky
 * @date 2021/5/17
 */
@Data
public class GzDataDTO {

    private String gzyqVersion;

    private String version;

    private String xmbm;

    private String xmmc;

    private String rybm;

    private String rymc;

    private List<Gzfl> gzflList;

    private List<Mxstgx> mxstgxList;

    private List<Ff> ffList;

    @Data
    public static class Gzfl {
        private String gzflbm;

        private String gzflmc;

        private String gzflbs;

        private String xmbm;

        private String sfsc;

        private Date cjsj;

        private Date zhxgsj;

        private List<Gzdy> gzdyList;
    }

    @Data
    public static class Gzdy {
        private String gzbm;

        private String gzmc;

        private String gzms;

        private String gzflbm;

        private GzBdsDTO gzbds;

        private String bmjh;

        private String zdjh;

        private String sfqy;

        private String gzpz;

        private Long px;

        private String sfsc;

        private Date cjsj;

        private Date zhxgsj;

        private List<Bds> bdsList;
    }

    @Data
    public static class Bds {
        private String bdsbm;

        private String gzbm;

        private String bdsmc;

        private String bdsms;

        private String bds;

        private String hczd;

        private BdslxEnum bdslx;

        private String sfsc;

        private Date cjsj;

        private Date zhxgsj;
    }

    @Data
    public static class Mxstgx {
        /**
         * 模型实体关系编码
         */
        private String mxstgxbm;
        /**
         * 模型编码
         */
        private String mxbm;

        /**
         * 主实体表名
         */
        private String zstbm;

        /**
         * 从实体表名
         */
        private String cstbm;

        /**
         * 项目编码
         */
        private String xmbm;

        /**
         * 关系编码
         */
        private String gxbm;

        /**
         * 关联关系
         */
        private String glgx;

        /**
         * 关联类型1.一对一2.一对多
         */
        private GllxEnum gllx;

        /**
         * 模型实体类型1:数据主表2:业务主表3:关联表
         */
        private String mxstlx;

        /**
         * 是否删除
         */
        private String sfsc;

        /**
         * 创建时间
         */
        private Date cjsj;

        /**
         * 最后修改时间
         */
        private Date zhxgsj;
    }

    @Data
    public static class Ff {
        /**
         * 方法名称
         */
        private String ffmc;

        /**
         * 方法中文名称
         */
        private String ffzwmc;

        /**
         * className
         */
        private String classname;

        /**
         * class数据
         */
        private byte[] classdata;

        /**
         * 是否删除
         */
        private String sfsc;

        /**
         * 创建时间
         */
        private Date cjsj;

        /**
         * 最后修改时间
         */
        private Date zhxgsj;
    }
}
